package jmine.tec.datadigester.positional.meta.factory;

import java.beans.PropertyDescriptor;

import jmine.tec.datadigester.positional.annotations.PositionalBigDecimalEntry;
import jmine.tec.datadigester.positional.meta.PositionalBigDecimalFieldMetadata;
import jmine.tec.datadigester.positional.meta.PositionalFieldMetadata;

/**
 * {@link PositionalFieldAnnotationSupport} para campos BigDecimal
 * 
 * @author israel.crisanto
 */
public class PositionalBigDecimalAnnotationSupport implements PositionalFieldAnnotationSupport<PositionalBigDecimalEntry> {

    /**
     * {@inheritDoc}
     */
    public PositionalFieldMetadata create(PropertyDescriptor property, PositionalBigDecimalEntry a) {
        return new PositionalBigDecimalFieldMetadata(property, a.description(), a.start(), a.size(), a.scale());
    }

    /**
     * {@inheritDoc}
     */
    public Class<PositionalBigDecimalEntry> annotationClass() {
        return PositionalBigDecimalEntry.class;
    }
}
